package com.hs.egova.controller;

import com.hs.egova.base.ResultInfo;
import com.hs.egova.service.UserManager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author husheng
 * @version v1.0
 * @date 2021/7/20 13:21
 * @email husheng@egova.com.cn
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/v2/test")
@Api(tags = "自定义用户查询")
public class TestController {

    private final UserManager userManager;

    /**
     * 加工姓名
     * @param name
     * @return
     */
    @ApiOperation("根据姓名查询")
    @GetMapping("/{name}")
    public ResultInfo testUser(@PathVariable String name) {
        return userManager.getUserByCustom(name);
    }
}
